package android.longs.study.upgrade.servlert;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import android.longs.study.base.HomeServlet;
import android.longs.study.upgrade.service.UpgradeService;
import android.longs.study.upgrade.service.UpgradeServiceImple;

@WebServlet("/upgreade")
public class UpgradeServlert extends HomeServlet {
	
	private UpgradeService service = new UpgradeServiceImple();

	@Override
	public void doRequestFunction(HttpServletRequest request,
			HttpServletResponse response) {
		
		try {

			String queryLastVersion = service.queryLastVersion();
			System.out.println(" 版本信息 "+queryLastVersion);
			response.getWriter().write(queryLastVersion);
		} catch (Exception e) {
			System.out.println("获取版本信息异常  "+e.getMessage());
		}
		
		

	}

}
